package com.zh.mediaservice.config;

import com.zh.mediacommon.properties.AliOssProperties;
import com.zh.mediacommon.util.AliMessageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OssConfiguration {
    @Autowired
    AliOssProperties aliOssProperties;
    @Bean
    public AliMessageUtil getAliMessageUtil() {
        return new AliMessageUtil(aliOssProperties.getProduct(), aliOssProperties.getAccessKeyId(), aliOssProperties.getAccessKeySecret(), aliOssProperties.getDomain(), aliOssProperties.getSignName(), aliOssProperties.getTemplateCode());
    }
}
